classes. Of course the return data this operation can be extracted separately as a corresponding return class, if this is to do processing in the returned data message, such as can return Xml,vector or hashtable or map. Here tentatively returns the data to the vector type, so the 6th step is encapsulated in.
Assemble SQL statements, create a separate class (Xmlcombine), of course, can also be divided into several, such as Selectcombine,insertcombine, where we carry out a unified package.
separate class, XMLExecuteSQL.
All the preceding classes have a uniform export class, which is XMLUtils. This class provides several methods for external data operations, such as select, insert, delete, and update, as well as several methods for external programs to access data, such: setTransNode (set transaction node), setTransValue (set transaction data value), setTransKeyValue (set transaction key value data value)
3. external program calls
For
.
Assemble SQL statements, create a separate class (Xmlcombine), of course, can also be divided into several, such as Selectcombine,insertcombine, where we carry out a unified package.
Database operations are individually encapsulated into a class, xmlexecutesql.
All of the above classes unify an export class, here for Xmlutils. This class provides several methods for manipulating external data, such as SELECT, INSERT, delete, update, and several meth
class, xmlexecutesql.
All the preceding classes have a uniform export class, which is xmlutils. This class provides several methods for external data operations, such as select, insert, delete, and update, as well as several methods for external programs to access data, such: settransnode (SET transaction node), settransvalue (SET transaction data value), settranskeyvalue (SET transaction key value data value)
Iii. External program calls
For select s
string.StringBuffer xml = new StringBuffer ();Xml. append (XmlUtils. beginDocument ("/browse_find/browse. xsl", "browse", request ));Xml. append (product. toXml ());Xml. append (XmlUtils. endDocument ("browse ");Out. print (xml. toString ());The next three xml. append () variables are calls to other methods.Generate a File HeaderThe first additional method calls the Xm
Xml operations are often used. Java contains dom, dom4j, and other tool classes, but Javascript does not. So I wrote one myself. Currently, it is counted as the first version. There must be many improvements. If you need them, you can leave a message or comment on bugs and areas that require improvement. The demo uses extjs to print the json array.
Js code (XmlUtils. js ):
The Code is as follows:
/**/Function X
(sw.GetStringBuilder().ToString())
Source file:D: \ works \ dotnetnuke3.0.8 \ Components \ shared \ xmlutils. VBLine:226
Assembly load trace:The following information can be helpful to determine why the Assembly '7 _ plmmyz. dll 'could not be loaded.
=== Pre-bind state information ===LOG: Where-ref bind. Location = C:\WINDOWS\TEMP\7_plmmyz.dllLOG: Appbase = file:///D:/Works/DotNetNuke3.0.8LOG: Initial PrivatePath = binCalling assembly
for Multipart.
Register (multipartfeature.class);
Load Resource
Register (recommendationpictureresource.class);
}
Recommendationpictureresource.java
Private final Log logger = Logfactory.getlog (Recommendationpictureresource.class);
@Autowired @Qualifier ("Pictureservice") Pictureservice pictureservice;//the service class that stores the image @Autowired @Qualifier ("Xmlutils") An XML file parsing tool class for the
calls to other methods.Generate a file headerThe first additional method calls the xmlutils class to generate an xml file header. The code in our java servlet is as follows:
public static string begindocument(string stylesheet, string page){ stringbuffer xml = new stringbuffer(); xml.append("
\n") .append("
\n"); xml.append("
This code generates an xml file header.
Label defines this file as an xml file that supports version 1.0. The
on the codeproject (a lot of it) and downloaded a few. I carefully studied the code, in the end, I felt that FSM was really a little useful. I found that I had never felt "unintelligent". I could use the constraints to avoid it. So I should return to XPath, then there will be the following code (a few tests are normal), and the subsequent sections (directly copy with comments) will not be available (I will go to work later ), then the function is not complete, and you will have time to complete
resolution in activity
public class Xmlactivity extends Appcompatactivity implements View.onclicklistener {private TextView TV;
Private Button Bt_dom, Bt_sax, Bt_pull;
Private Xmlutils xmlutils;
Private list
The three resolution methods have the same effect picture
The difference between Sax parsing and pull parsing
The difference between sax and pull: The SAX parser works by automatica
method. This instance immediately creates a stringbuffer to store the generated XML string.
StringBuffer XML = new StringBuffer ();
Xml.append (Xmlutils.begindocument ("/browse_find/browse.xsl", "Browse", request));
Xml.append (Product.toxml ());
Xml.append (xmlutils.enddocument ("browse");
Out.print (Xml.tostring ());
The next three xml.append () variable itself is a call to other methods.
Generate File Headers
The first additional method calls the Xmlu
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.